CommandBusAdapter.execute   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
1
import { CommandBus } from '@nestjs/cqrs';
2
import { Injectable } from '@nestjs/common';
3
import { ICommandBus } from 'src/Application/ICommandBus';
4
import { ICommand } from 'src/Application/ICommand';
5
6
@Injectable()
7
export class CommandBusAdapter implements ICommandBus {
8
  constructor(private readonly commandBus: CommandBus) {}
9
10
  public execute(command: ICommand): Promise<any> {
11
    return this.commandBus.execute(command);
12
  }
13
}
14